package com.ahu.mapper;

import com.ahu.pojo.User;
import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.List;

/**
 * Author: Zhang Dongwei
 * Date: 2022/5/14 12:41
 */
public class UserMapperImpl2 extends SqlSessionDaoSupport implements UserMapper {
    public List<User> selectUser() {
//        SqlSession sqlSession = getSqlSession();
//        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
//        return mapper.selectUser();
//        精简到一行
        return getSqlSession().getMapper(UserMapper.class).selectUser();
    }
}
